import { TOKEN_KEY } from '@/constants'
import Cookies from 'js-cookie'

// TOKEN_KEY是键名称

// 获取token
export const getLocalToken = ()=>{
  return Cookies.get(TOKEN_KEY)
}
// 设置token
export const setLocalToken = (token:string)=>{
  // set要求至少2个参数
   Cookies.set(TOKEN_KEY,token)
}
// 删除token
export const removeLocalToken = ()=>{
   Cookies.remove(TOKEN_KEY)
}